package football_behaviour

import (
	"longmen/server/internal/services/nami/services/sports/football"
	"longmen/server/pkg/db/mysql/models/models_sports"
)

type (
	EurOddsCompany struct {
		Code    int          `json:"code"`
		Results []EurCompany `json:"results"`
	}
	EurCompany struct {
		ID     int    `json:"id"`
		NameZh string `json:"name_zh"`
		NameEn string `json:"name_en"`
	}
)

func (e EurCompany) Get() models_sports.FootballEurCompany {
	return models_sports.FootballEurCompany{
		ID:     e.ID,
		NameEn: e.NameEn,
		NameZh: e.NameZh,
	}
}

func (c EurOddsCompany) InsertInterfaces() []football.InsertEurCompanyInterface {
	records := make([]football.InsertEurCompanyInterface, 0)
	for _, item := range c.Results {
		records = append(records, item)
	}
	return records
}
